package com.heima.admin.controller;

import com.heima.admin.dto.LoginDto;
import com.heima.admin.service.IAdUserService;
import com.heima.common.dto.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/login")
@Api(tags = "登录API")
public class LoginController {
    @Autowired
    private IAdUserService iAdUserService;
    @PostMapping("/in")
    @ApiOperation(value = "登录", notes = "author:GQ")  // value指名称  notes 备注
    public ResponseResult login(@RequestBody LoginDto loginDto){

        return iAdUserService.login(loginDto);
    }
}
